package com.xiaomaoguai.hessian.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @fileName: HessianClientProperties.java
 * @author: WeiHui-Z
 * @date: 2018/1/18 15:40
 * @version: v1.0.0
 */
@Data
@ConfigurationProperties("hessian.client")
public class HessianClientProperties {

	/**
	 * 默认连接超时时间
	 */
	private static final int DEFAULT_CONN_TIMEOUT = 60;

	/**
	 * 默认读取超时时间
	 */
	private static final int DEFAULT_READ_TIMEOUT = 60;

	/**
	 * 方法是否允许重载
	 */
	private static final boolean DEFAULT_OVERLOAD_ENABLED = true;

	/**
	 * 默认连接超时时间
	 */
	private int connTimeout = DEFAULT_CONN_TIMEOUT;

	/**
	 * 默认读取超时时间
	 */
	private int readTimeout = DEFAULT_READ_TIMEOUT;

	/**
	 * 访问前缀
	 */
	private String prefix;

	/**
	 * 访问后缀
	 */
	private String suffix;

	/**
	 * 访问地址
	 */
	private String serverUrl;

	/**
	 * hessian-server方法是否允许重载
	 */
	private boolean overloadEnabled = DEFAULT_OVERLOAD_ENABLED;

}
